home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / comms_w / wrcprs14.zip / RSH.DOC < prev    next >
Text File  |  1995-01-17  |  7KB  |  190 lines

  1.   Winsock RSH                                        Version 1.4
  2.   Copyright 1994 Denicomp Systems
  3.   All rights reserved
  4.   
  5.   DESCRIPTION
  6.   -----------
  7.   
  8.   Winsock RSH executes a command on a remote host and displays the
  9.   results on your PC's screen or stores the output in a file.  It is
  10.   similar to the Unix utility of the same name.
  11.   
  12.   The remote host must be a system running the rshd server process
  13.   (i.e. a Unix system).  You cannot execute a command on another PC,
  14.   for example.
  15.  
  16.   Any output from the remote command will be displayed in the Winsock
  17.   RSH window.  The output includes both the standard output and the
  18.   standard error output of the command executed.  This can be redirected
  19.   to a file using the -r option.
  20.  
  21.   IMPORTANT!  You cannot use Winsock RSH to execute an interactive remote
  22.   command.  If you need to execute an interactive command on the remote host,
  23.   you must use a utility like Telnet.
  24.  
  25.  
  26.   REQUIREMENTS
  27.   ------------
  28.  
  29.   Winsock RSH requires a PC running Windows 3.1 or higher and a Windows
  30.   Sockets compatible TCP/IP stack.
  31.  
  32.  
  33.   SYNTAX
  34.   ------
  35.   
  36.   rsh Host [ -l User ] [-m] [-w] [-r File ] { Command | @File }
  37.   
  38.  
  39.   PARAMETERS
  40.   ----------
  41.  
  42.   Host       The host name of the remote host on which the command is
  43.              to be executed.
  44.  
  45.   Command    The command to execute.  If the command contains special
  46.              characters that are interpreted by a command shell, you
  47.              must enclose the command inside double quotes (" ").
  48.  
  49.              NOTE: Winsock RSH will not expand wildcard characters to
  50.              match filenames on the local PC, so these do not need to
  51.              be enclosed in quotes.
  52.  
  53.   @File      Instead of specifying the Command on the command line, you
  54.              can store the command to execute in a file.  If this parameter
  55.              begins with the at-sign (@), the command is read from the
  56.              filename following it.  (Do not put any spaces between the @
  57.              and the filename.)  Since the length of the MS-DOS command
  58.              line is limited, you can specify longer commands (up to 2048
  59.              characters*) by storing them in a file.
  60.  
  61.          * - assuming the remote host allows commands this long
  62.  
  63.   FLAGS
  64.   -----
  65.   
  66.   -l User    Specifies that Winsock RSH should log in to the remote
  67.              host as the user specified by the User variable instead of
  68.              the local user name.  If this flag is not specified,  the
  69.              local and remote user names are the same.
  70.   
  71.   -r File    Redirects any output from Winsock RSH to the File instead
  72.              of displaying it on the screen.
  73.  
  74.   -m         *Run Minimized.  Normally, Winsock RSH will display a window
  75.              showing the output of the command executed and any possible error
  76.              messages.  With -m, Winsock RSH will only display a minimized
  77.              icon while running.  This is useful for software developers who
  78.              wish to transparently call Winsock RSH from within their software.
  79.  
  80.   -w         Wait for the Return key after the command completes.  This allows
  81.              you to see the output of the command before the window is closed
  82.              when the command completes.  It will display "Press Return:"
  83.              and wait for you to press Return.  Before pressing Return, you
  84.              can use the scrollbars to review any scrolled lines.
  85.  
  86.  
  87.         * - This option is available only in the registered version.
  88.  
  89.   If you do not specify the  -l flag, the local user name is used at the
  90.   remote host.  If -l User is entered, that user name is used at the remote
  91.   host.
  92.  
  93.   The local user name is determined by first looking in the file WIN.INI
  94.   in the Windows directory.  If this file contains a section named "[RSH]"
  95.   and contains an entry named "User" in that section, the name specified
  96.   there will be used as the local user name.  For example, WIN.INI would
  97.   contain:
  98.  
  99.      [RSH]
  100.      User=joe
  101.  
  102.   If this appeared in WIN.INI, the local user name would be "joe" and Winsock
  103.   RSH would use this name at the remote host.
  104.  
  105.   If this section does not appear in WIN.INI, Winsock RSH uses the Computer
  106.   Name specified in the Windows for Workgroups Network Setup (found on the
  107.   Control Panel).  This name is converted to lowercase characters and Winsock
  108.   RSH uses this name at the remote host.  Therefore, if no user name is
  109.   specified in WIN.INI, the Computer Name of the PC must be set up as a
  110.   valid user on the remote host, in addition to being included in the
  111.   remote host's /etc/hosts.equiv file.
  112.  
  113.   (If you are not using Windows for Workgroups and your network does not
  114.   provide the services that Windows for Workgroups provides, you must use
  115.   WIN.INI to specify the user name.)
  116.  
  117.  
  118.   SECURITY
  119.   --------
  120.   
  121.   The remote host allows access only if at least one of the following
  122.   conditions is satisfied:
  123.   
  124.   * The name of the local host is listed as an equivalent host in the
  125.     /etc/hosts.equiv file on the remote host.
  126.  
  127.     The method of specifying the local host name is determined by the
  128.     particular TCP/IP stack you are using.
  129.   
  130.   * If the local host is not in the /etc/hosts.equiv file, the user's home
  131.     directory on the remote host must contain a .rhosts file that lists the
  132.     local host and user name.
  133.   
  134.   * The user's login on the remote host does not require a password.
  135.  
  136.   The .rhosts file in the user's home directory must be owned by either
  137.   the user specified or root, and only the owner should have read and write
  138.   access.
  139.   
  140.  
  141.   EXAMPLES
  142.   --------
  143.   
  144.   * To display the users logged in to a remote host, use:
  145.   
  146.             rsh remhost who
  147.   
  148.     The list of users is displayed in the RSH window on your PC.  As you see,
  149.     the window is closed when the command ends, so this command is not very
  150.     useful.  Try this:
  151.  
  152.             rsh -w remhost who
  153.  
  154.     This will list the users on the remote host, then wait for you to press
  155.     the Return key before closing the window.  If the list of users scrolled
  156.     the window, you can use the scrollbars to view the scrolled information.
  157.   
  158.  
  159.   * To list the files in the /usr directory ending with .txt on the remote
  160.     host, use:
  161.  
  162.              rsh -w remhost ls /usr/*.txt
  163.  
  164.     The files in the /usr directory are displayed in the Winsock RSH window.
  165.     Again, the -w option is used to wait for the Return key so you can see the
  166.     results.
  167.  
  168.  
  169.   * This lists the contents of the /usr directory on the remote host and
  170.     stores it in the file "usrfiles.txt" on your PC.  We will run the command
  171.     minimized so the RSH window does not display:
  172.  
  173.              rsh -m -r \lists\usrfiles.txt remhost ls /usr
  174.  
  175.     The file "usrfiles.txt" will contain the list of files in /usr.
  176.  
  177.  
  178. SUPPORT
  179. -------
  180.  
  181. Support is available via U.S. Mail and Compuserve/Internet.
  182.  
  183. Denicomp Systems
  184. P.O. Box 731
  185. Exton, PA  19341
  186.  
  187. Compuserve: 71612,2333
  188. Internet:   71612.2333@compuserve.com
  189.  
  190.